
package laboratorio;

public class IntegerOperations {
    private Object dato;
    private Object dato2;
    
    public IntegerOperations(){     
    }
    
     public IntegerOperations(Object dat, Object dat2){
         dato=dat;
         dato2=dat2;
    }

     public Object getDato () {
        return dato;
    }
    
    public void setDato (Object val) {
        this.dato = val;
    }
    
     public Object getDato2 () {
        return dato2;
        
    }
    
    public void setDato2 (Object val) {
        this.dato2 = val;
    }

    public Object sum(){
        int a=Integer.parseInt(dato.toString());
        int b=Integer.parseInt(dato2.toString());

        return a+b;
    }

    public Object substraction(){
        int a=Integer.parseInt(dato.toString());
        int b=Integer.parseInt(dato2.toString());

        return a-b;
    }

    public Object mult(){
        int a=Integer.parseInt(dato.toString());
        int b=Integer.parseInt(dato2.toString());

        return a*b;
    }

    public Object div(){
        //if(dato2==0){return-1 ;}
        
        int a=Integer.parseInt(dato.toString());
        int b=Integer.parseInt(dato2.toString());

        return a/b;
    }

}
